<template>
    <fieldset>
        <legend>购物车</legend>
        <ul>
            <li v-for="item in addList" :key="item.id">
                    产品：{{item.title}}
                -------
                    价格：{{item.price}}
                -------
                    数量：{{item.count}}
                -------
                <button>-</button>
            </li>
          
        </ul>
        <h1>总价:{{total}}</h1>
    </fieldset>
</template>
<script setup>
import { useCart } from '../../store/cart';
import {storeToRefs} from "pinia"



let userStore=useCart()

let {addList,total} = storeToRefs(userStore)

console.log(addList)




</script>